source("./read_from_db.R")
This is a first pass exploration of different aspects of beer. The data was collected via the BreweryDB API. Special thanks to Kris Kroski for data ideation and co-membership in the honourable workplace beer consortium.
The main question this analysis is meant to tackle is: Are beer styles actually indicative of shared attributes of the beers within that style? Or are style boundaries more or less arbitrary? I took two approaches to this: unsupervised clustering and supervised prediction.
Clusters defined by the algorithm were compared to the style “centers” as defined by the mean ABV, IBU, and SRM. On the prediction side, predictor variables for include ABV (alcohol by volume), IBU (international bitterness units), SRM (a measure of color) as well as ingredients like hops and malts. The outcome variable is the style that beer was assigned.
This document starts off with an explanation of how I sourced beer data from BreweryDB, cleaned that data, and stuck the parts of it I wanted in a database. (These are just the highlights; the code actually executed in this document queries that database, specifically by sourcing the file read_from_db.R, also in this repo, rather than hitting the BreweryDB API. This is done for expediency’s sake as the code below detailing how to actually get the beer data, run in full in run_it.R, takes some time to execute.)
It then moves into clustering (k-means) and prediction (neural net, random forest).
The answer thus far seems to be that the beer landscape is more of a spectrum than a collection of neatly differentiated styles. Beer-intrinsic attributes like bitterness aren’t great predictors of style. The relative importance of different variables depeends on the prediction method used. However, one style-defined attribute, the glass a beer is served in, increased the accuracy of prediction substantially.
Of course, other important aspects of the flavor, body, smell, etc. of the beers could not be considered because this data is not available from BreweryDB.
Get and Prepare
When we first hit the BreweryDB API to iteratively pull in all beers and their ingredients along with other things we might want like breweries and glassware. Then we unnest the JSON responses, including all the ingredients columns, and dump this all into a MySQL database.
Next, we create a style_collapsed column to reduce the number of levels of our outcome variable. We do this by greping through each beer’s style to determine if that style contains a keyword that qualifies it to be rolled into a collapsed style; if it does, it gets that keyword in a style_collapsed column.
Finally we unnest the ingredients hops and malts into a wide, sparse dataframe. Individual ingredients are now columns, with each beer still in its own rows; a cell gets a 1 if ingredient is present and 0 otherwise. This allows more granual inference into ingredients’ effects on both style and bitterness (occasioning a short foray into hops).
Short foray into hops
A quick look at the most popular hops and an exploration of the relationship between hops and bitterness.
Infer
Cluster: unsupervised k-means clustering partitioning the entire dataset into ten clusters. Next, we cluster on a dataset composed of just five selected styles into five clusters.
We then attempt to predict predict either style or style_collapsed using a neural net and a random forest. The main predictors are ABV, IBU, SRM, total number of hops, and total number of malts. The glass a beer is served in is also considered. Finally,
Short Aside
The question of what should be a predictor variable for style is a bit murky here. What should be fair game for predicting style and what shouldn’t? Characteristics of a beer that are defined by its style would seem to be “cheating” in a way. The only “inputs” to a beer we have in our dataset are its ingredients, primarly hops and malts. While these certainly have an effect on its flavor profile, I consider them semi-cheating because if style is determined beforehand it likely determines at least in part which ingredients are added. The main candidates in my mind are ABV, IBU, and SRM. These are “outputs” of a beer (in the sense that they can only be exactly determined once a beer is brewered) that meaningfully define it. While correlated ABV is correlated with both IBU and SRM, the three are theoretically orthogonal to each other. A style-defined attribute like glass type is a bad candidate for a predictor variable because it is completely decoupled from the beer itself and determined entirely by the style the beer has been assigned to.
Getting beer, the age-old dilemma
1:number_of_pages
number_of_pages to, e.g., 3 if we only want the first 3 pagesaddition parameter can be an empty string if nothing else is neededbase_url <- "http://api.brewerydb.com/v2"
key_preface <- "/?key="
paginated_request <- function(ep, addition, trace_progress = TRUE) {
full_request <- NULL
first_page <- fromJSON(paste0(base_url, "/", ep, "/", key_preface, key
, "&p=1"))
number_of_pages <- ifelse(!(is.null(first_page$numberOfPages)),
first_page$numberOfPages, 1)
for (page in 1:number_of_pages) {
this_request <- fromJSON(paste0(base_url, "/", ep, "/", key_preface, key
, "&p=", page, addition),
flatten = TRUE)
this_req_unnested <- unnest_it(this_request) # <- request unnested here
if(trace_progress == TRUE) {message(paste0("Page ", this_req_unnested$currentPage))}
full_request <- bind_rows(full_request, this_req_unnested[["data"]])
}
return(full_request)
}
all_beer_raw <- paginated_request("beers", "&withIngredients=Y")
paginated_request() below
name nested within a column in the data portion of the response
name column doesn’t exist, it takes the first nested columnhops_name and malt_nameunnest_it <- function(df) {
unnested <- df
for(col in seq_along(df[["data"]])) {
if(! is.null(ncol(df[["data"]][[col]]))) {
if(! is.null(df[["data"]][[col]][["name"]])) {
unnested[["data"]][[col]] <- df[["data"]][[col]][["name"]]
} else {
unnested[["data"]][[col]] <- df[["data"]][[col]][[1]]
}
}
}
return(unnested)
}
Collapse Styles
keywordsgrep through its style column to see if it contains any one of these keywordsstyle_collapsedstyle_collapsed is the last of those that appear in keywords
keywords after India Pale Ale and Pale Ale, an American Double India Pale Ale would get a style_collapsed of Double India Pale Alestyle, style_collapsed is just whatever’s in style; in other words, it doesn’t get collpsed into a bigger bucket
style_collapsedkeywords <- c("Lager", "Pale Ale", "India Pale Ale", "Double India Pale Ale", "India Pale Lager", "Hefeweizen", "Barrel-Aged","Wheat", "Pilsner", "Pilsener", "Amber", "Golden", "Blonde", "Brown", "Black", "Stout", "Porter", "Red", "Sour", "Kölsch", "Tripel", "Bitter", "Saison", "Strong Ale", "Barley Wine", "Dubbel", "Altbier")
collapse_styles <- function(df, trace_progress = TRUE) {
df[["style_collapsed"]] <- vector(length = nrow(df))
for (beer in 1:nrow(df)) {
if (grepl(paste(keywords, collapse="|"), df$style[beer])) {
for (keyword in keywords) {
if(grepl(keyword, df$style[beer]) == TRUE) {
df$style_collapsed[beer] <- keyword
}
}
} else {
df$style_collapsed[beer] <- as.character(df$style[beer])
}
if(trace_progress == TRUE) {message(paste0("Collapsing this ", df$style[beer], " to: ", df$style_collapsed[beer]))}
}
return(df)
}
fct_collapseing those levelscollapse_further <- function(df) {
df[["style_collapsed"]] <- df[["style_collapsed"]] %>%
fct_collapse(
"Wheat" = c("Hefeweizen", "Wheat"),
"Pilsener" = c("Pilsner", "American-Style Pilsener") # pilsener == pilsner == pils
)
return(df)
}
Split out Ingredients
When we unnested ingredients, we just concatenated all of the ingredients for a given beer into a long string. If we want, we can split out the ingredients that were concatenated in <ingredient>_name with this split_ingredients function.
This takes a vector of ingredients_to_split, so e.g. c("hops_name", "malt_name") and creates one column for each type of ingredient (hops_name_1, hops_name_2, etc.). It’s flexible enough to adapt if data in BreweryDB changes and a beer now has 15 hops where before the maximum number of hops a beer had was 10.
split_ingredients <- function(df, ingredients_to_split) {
ncol_df <- ncol(df)
for (ingredient in ingredients_to_split) {
ingredient_split <- str_split(df[[ingredient]], ", ")
num_new_cols <- max(lengths(ingredient_split))
for (num in 1:num_new_cols) {
this_col <- ncol_df + 1
df[, this_col] <- NA
names(df)[this_col] <- paste0(ingredient, "_", num)
ncol_df <- ncol(df)
for (row in seq_along(ingredient_split)) {
if (!is.null(ingredient_split[[row]][num])) {
df[row, this_col] <- ingredient_split[[row]][num]
}
}
df[[names(df)[this_col]]] <- factor(df[[names(df)[this_col]]])
}
ncol_df <- ncol(df)
}
return(df)
}
Some quick summary stats on our main dataframe called beer_necessities:
dim(beer_necessities)
[1] 63495 39
str(beer_necessities)
'data.frame': 63495 obs. of 39 variables:
$ id : chr "cBLTUw" "ZsQEJt" "tmEthz" "b7SfHG" ...
$ name : chr "\"18\" Imperial IPA 2" "\"633\" American Pale Ale" "\"Admiral\" Stache" "\"Ah Me Joy\" Porter" ...
$ description : chr "Hop Heads this one's for you! Checking in with 143 IBU's this ale punches you in the mouth with extreme bitterness then rounds"| __truncated__ "Our first beer has been aptly named \"633\" after the Regions telephone exchange for starters. \"If I could call a beer home, "| __truncated__ "Milwaukee Brewing Co’s take on a classic European style. Baltic Porters are the stronger lager fermented cousin of the classic "| __truncated__ "A robust porter style ale with a twist. This beer has moderate roastiness with a bitter finish, complemented by the sweetness o"| __truncated__ ...
$ style : Factor w/ 170 levels "Adambier","Aged Beer (Ale or Lager)",..: 13 20 30 139 23 108 8 20 7 54 ...
$ abv : num 11.1 6.33 7 5.4 4.8 4.6 8.5 5.8 7.6 10.8 ...
$ ibu : num NA 25 23 51 12 NA 30 51 80 70 ...
$ srm : num 33 NA 37 40 NA 5 NA 8 NA NA ...
$ glass : Factor w/ 12 levels "Flute","Goblet",..: 6 NA 6 NA NA NA NA NA NA NA ...
$ hops_name : Factor w/ 969 levels "","#06300","Admiral, Aurora, Challenger, Fuggle (American), Target",..: NA NA 902 NA NA NA NA NA NA NA ...
$ hops_id : Factor w/ 969 levels "","1, 22, 23, 25, 146",..: NA NA 955 NA NA NA NA NA NA NA ...
$ malt_name : Factor w/ 923 levels "","Abbey Malt",..: NA NA 143 NA NA NA NA NA NA NA ...
$ malt_id : Factor w/ 923 levels "","165","165, 1947, 633, 1922",..: NA NA 124 NA NA NA NA NA NA NA ...
$ glasswareId : num 5 NA 5 NA NA NA NA NA NA NA ...
$ styleId : Factor w/ 170 levels "1","10","100",..: 109 89 7 82 106 101 102 89 107 68 ...
$ style.categoryId: num 3 3 9 1 3 3 3 3 3 1 ...
$ style_collapsed : Factor w/ 108 levels "Adambier","Altbier",..: 101 81 84 84 95 21 24 81 20 101 ...
$ hops_name_1 : Factor w/ 113 levels "","#06300","Admiral",..: NA NA 90 NA NA NA NA NA NA NA ...
$ hops_name_2 : Factor w/ 98 levels "Amarillo","Apollo",..: NA NA 70 NA NA NA NA NA NA NA ...
$ hops_name_3 : Factor w/ 90 levels "Amarillo","Aramis",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_4 : Factor w/ 63 levels "Amarillo","Apollo",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_5 : Factor w/ 50 levels "Australian Dr. Rudi",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_6 : Factor w/ 29 levels "Cascade","Columbus",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_7 : Factor w/ 20 levels "Azzeca","Crystal",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_8 : Factor w/ 10 levels "Equinox","Experimental 06277",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_9 : Factor w/ 4 levels "Motueka","Nugget",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_10 : Factor w/ 4 levels "Nelson Sauvin",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_11 : Factor w/ 4 levels "Simcoe","Styrian Bobeks",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_12 : Factor w/ 3 levels "Summit","Super Galena",..: NA NA NA NA NA NA NA NA NA NA ...
$ hops_name_13 : Factor w/ 2 levels "Target","Willamette": NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_1 : Factor w/ 128 levels "","Abbey Malt",..: NA NA 9 NA NA NA NA NA NA NA ...
$ malt_name_2 : Factor w/ 134 levels "Amber Malt","Barley - Flaked",..: NA NA 64 NA NA NA NA NA NA NA ...
$ malt_name_3 : Factor w/ 122 levels "Acidulated Malt",..: NA NA 73 NA NA NA NA NA NA NA ...
$ malt_name_4 : Factor w/ 94 levels "Bamberg Smoked Malt",..: NA NA 52 NA NA NA NA NA NA NA ...
$ malt_name_5 : Factor w/ 62 levels "Asheburne Mild Malt",..: NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_6 : Factor w/ 41 levels "Aromatic Malt",..: NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_7 : Factor w/ 19 levels "Barley - Roasted",..: NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_8 : Factor w/ 15 levels "Crisp 120","Crisp 77",..: NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_9 : Factor w/ 6 levels "Rye Malt","Smoked Malt",..: NA NA NA NA NA NA NA NA NA NA ...
$ malt_name_10 : Factor w/ 1 level "Victory Malt": NA NA NA NA NA NA NA NA NA NA ...
Find the Most Popualar Styles
We find mean ABV, IBU, and SRM per collapsed style and arrange collapsed styles by the number of beers that fall into them. (This is of course dependent on how we collapse styles; if we looped all Double IPAs in with IPAs then the category IPA would be much bigger than it is if we keep the two separate.)
library(forcats)
# Pare down to only cases where style is not NA
beer_dat_pared <- beer_necessities[complete.cases(beer_necessities$style), ]
# Arrange beer dat by style popularity
style_popularity <- beer_dat_pared %>%
group_by(style) %>%
count() %>%
arrange(desc(n))
# Add a column that scales popularity
style_popularity <- bind_cols(style_popularity,
n_scaled = as.vector(scale(style_popularity$n)))
# Find styles that are above a z-score of 0
popular_styles <- style_popularity %>%
filter(n_scaled > 0)
# Pare dat down to only beers that fall into those styles
popular_beer_dat <- beer_dat_pared %>%
filter(
style %in% popular_styles$style
) %>%
droplevels() %>%
as_tibble()
How many rows do we have in our dataset of just beers that fall into the popular styles?
nrow(popular_beer_dat)
[1] 45871
Now we find the style centers.
# Find the centers (mean abv, ibu, srm) of the most popular styles
style_centers <- popular_beer_dat %>%
group_by(style_collapsed) %>%
add_count() %>%
summarise(
mean_abv = mean(abv, na.rm = TRUE),
mean_ibu = mean(ibu, na.rm = TRUE),
mean_srm = mean(srm, na.rm = TRUE),
n = median(n, na.rm = TRUE) # Median here only for summarise. Should be just the same as n
) %>%
arrange(desc(n)) %>%
drop_na() %>%
droplevels()
# Give some nicer names
style_centers_rename <- style_centers %>%
rename(
`Collapsed Style` = style_collapsed,
`Mean ABV` = mean_abv,
`Mean IBU` = mean_ibu,
`Mean SRM` = mean_srm,
`Numer of Beers` = n
)
Take a look at the table, ordered by number of beers in that style, descending.
kable(style_centers_rename)
| Collapsed Style | Mean ABV | Mean IBU | Mean SRM | Numer of Beers |
|---|---|---|---|---|
| India Pale Ale | 6.578468 | 66.04268 | 9.989313 | 6524 |
| Pale Ale | 5.695480 | 40.86930 | 8.890306 | 4280 |
| Stout | 7.991841 | 43.89729 | 36.300000 | 4238 |
| Wheat | 5.158040 | 17.47168 | 5.861842 | 3349 |
| Double India Pale Ale | 8.930599 | 93.48142 | 11.006873 | 2525 |
| Red | 5.742565 | 33.81127 | 16.178862 | 2521 |
| Lager | 5.453718 | 30.64361 | 8.457447 | 2230 |
| Saison | 6.400189 | 27.25114 | 7.053476 | 2167 |
| Blonde | 5.595298 | 22.39432 | 5.625000 | 2044 |
| Porter | 6.182049 | 33.25369 | 32.197605 | 1973 |
| Brown | 6.159212 | 32.21577 | 23.592000 | 1462 |
| Pilsener | 5.227593 | 33.51346 | 4.413462 | 1268 |
| Specialty Beer | 6.446402 | 33.77676 | 15.520548 | 1044 |
| Bitter | 5.322364 | 38.28175 | 12.460526 | 939 |
| Fruit Beer | 5.195222 | 19.24049 | 8.666667 | 905 |
| Herb and Spice Beer | 6.621446 | 27.77342 | 18.166667 | 872 |
| Sour | 6.224316 | 18.88869 | 10.040816 | 797 |
| Strong Ale | 8.826425 | 36.74233 | 22.547945 | 767 |
| Tripel | 9.029775 | 32.51500 | 7.680556 | 734 |
| Black | 6.958714 | 65.50831 | 31.080000 | 622 |
| Barley Wine | 10.781600 | 74.04843 | 19.561404 | 605 |
| Kölsch | 4.982216 | 23.37183 | 4.371795 | 593 |
| Barrel-Aged | 9.002506 | 39.15789 | 18.133333 | 540 |
| Other Belgian-Style Ales | 7.516318 | 37.55812 | 17.549020 | 506 |
| Pumpkin Beer | 6.712839 | 23.48359 | 17.918033 | 458 |
| Dubbel | 7.509088 | 25.05128 | 22.940000 | 399 |
| Scotch Ale | 7.620233 | 26.36909 | 24.222222 | 393 |
| German-Style Doppelbock | 8.045762 | 28.88692 | 25.696970 | 376 |
| Fruit Cider | 6.205786 | 25.60000 | 12.000000 | 370 |
| German-Style Märzen | 5.746102 | 25.63796 | 14.322581 | 370 |
To get more granular with ingredients, we can split out each individual ingredient into its own column. If a beer or style contains that ingredient, its row gets a 1 in that ingredient column and a 0 otherwise.
From this, we can find the total number of hops and malts per grouper.
The dataframe we’ll use will be beer_necessities
ingredient_want: this can be hops, malt, or other ingredients like yeast if we pull that ingrouper: can be a vector of one or more things to group by, like beer name or stylepick_ingredient_get_beer <- function (ingredient_want, df, grouper) {
# ----------------------- Setup --------------------------- #
# We've already split ingredient number names out from the concatenated string into columns like `malt_name_1`,
# `malt_name_2`, etc. We need to find the range of these columns; there will be a different number of malt
# columns than hops columns, for instance. The first one will be `<ingredient>_name_1` and from this we can find
# the index of this column in our dataframe. We get the name of last one with the `get_last_ing_name_col()`
# function. Then we save a vector of all the ingredient column names in `ingredient_colnames`. It will stay
# constant even if the indices change when we select out certain columns.
# First ingredient
first_ingredient_name <- paste(ingredient_want, "_name_1", sep="")
first_ingredient_index <- which(colnames(df)==first_ingredient_name)
# Get the last ingredient
get_last_ing_name_col <- function(df) {
for (col in names(df)) {
if (grepl(paste(ingredient_want, "_name_", sep = ""), col) == TRUE) {
name_last_ing_col <- col
}
}
return(name_last_ing_col)
}
# Last ingredient
last_ingredient_name <- get_last_ing_name_col(df)
last_ingredient_index <- which(colnames(df)==last_ingredient_name)
# Vector of all the ingredient column names
ingredient_colnames <- names(df)[first_ingredient_index:last_ingredient_index]
# Non-ingredient column names we want to keep
to_keep_col_names <- c("id", "cluster_assignment", "name", "abv", "ibu", "srm", "style", "style_collapsed")
# -------------------------------------------------------------------------------#
# Inside `gather_ingredients()` we take out superflous column names that are not in `to_keep_col_names` or one
# of the ingredient columns, find what the new ingredient column indices are, since they'll have changed after
# we pared down and then gather all of the ingredient columns (e.g., `hops_name_1`) into one long column,
# `ing_keys` and all the actual ingredient names (e.g., Cascade) into `ing_names`.
# ----------------------------- Gather columns --------------------------------- #
gather_ingredients <- function(df, cols_to_gather) {
to_keep_indices <- which(colnames(df) %in% to_keep_col_names)
selected_df <- df[, c(to_keep_indices, first_ingredient_index:last_ingredient_index)]
new_ing_indices <- which(colnames(selected_df) %in% cols_to_gather) # indices will have changed since we pared down
df_gathered <- selected_df %>%
gather_(
key_col = "ing_keys",
value_col = "ing_names",
gather_cols = colnames(selected_df)[new_ing_indices]
) %>%
mutate(
count = 1
)
return(df_gathered)
}
beer_gathered <- gather_ingredients(df, ingredient_colnames) # ingredient colnames defined above function
# ------------------------------------------------------------------------------- #
# Next we get a vector of all ingredient levels and take out the one that's an empty string and
# use this vector of ingredient levels in `select_spread_cols()` below
# Get a vector of all ingredient levels
beer_gathered$ing_names <- factor(beer_gathered$ing_names)
ingredient_levels <- levels(beer_gathered$ing_names)
# Take out the level that's just an empty string
to_keep_levels <- !(c(1:length(ingredient_levels)) %in% which(ingredient_levels == ""))
ingredient_levels <- ingredient_levels[to_keep_levels]
beer_gathered$ing_names <- as.character(beer_gathered$ing_names)
# ----------------------------------------------------------------------------- #
# Then we spread the ingredient names: we take what was previously the `value` in our gathered dataframe, the
# actual ingredient names (Cascade, Centennial) and make that our `key`; it'll form the new column names. The
# new `value` is `value` is count; it'll populate the row cells. If a given row has a certain ingredient, it
# gets a 1 in the corresponding cell, an NA otherwise.
# We add a unique idenfitier for each row with `row`, which we'll drop later (see [Hadley's SO
# comment](https://stackoverflow.com/questions/25960394/unexpected-behavior-with-tidyr)).
# ------------------------------- Spread columns -------------------------------- #
spread_ingredients <- function(df) {
df_spread <- df %>%
mutate(
row = 1:nrow(df) # Add a unique idenfitier for each row which we'll need in order to spread; we'll drop this later
) %>%
spread(
key = ing_names,
value = count
)
return(df_spread)
}
beer_spread <- spread_ingredients(beer_gathered)
# ------------------------------------------------------------------------------- #
# ------------------------- Select only certain columns ------------------------- #
select_spread_cols <- function(df) {
to_keep_col_indices <- which(colnames(df) %in% to_keep_col_names)
to_keep_ingredient_indices <- which(colnames(df) %in% ingredient_levels)
to_keep_inds_all <- c(to_keep_col_indices, to_keep_ingredient_indices)
new_df <- df %>%
select_(
.dots = to_keep_inds_all
)
return(new_df)
}
beer_spread_selected <- select_spread_cols(beer_spread)
# ------------------------------------------------------------------------------- #
# Take out all rows that have no ingredients specified at all
inds_to_remove <- apply(beer_spread_selected[, first_ingredient_index:last_ingredient_index],
1, function(x) all(is.na(x)))
beer_spread_no_na <- beer_spread_selected[ !inds_to_remove, ]
# ----------------- Group ingredients by the grouper specified ------------------- #
# Then we do the final step and group by the groupers.
get_ingredients_per_grouper <- function(df, grouper = grouper) {
df_grouped <- df %>%
ungroup() %>%
group_by_(grouper)
not_for_summing <- which(colnames(df_grouped) %in% to_keep_col_names)
max_not_for_summing <- max(not_for_summing)
browser()
per_grouper <- df_grouped %>%
select(-c(abv, ibu, srm)) %>% # taking out temporarily
summarise_if(
is.numeric,
sum, na.rm = TRUE
# -c(abv, ibu, srm)
) %>%
mutate(
total = rowSums(.[(max_not_for_summing + 1):ncol(.)], na.rm = TRUE)
)
# Send total to the second position
per_grouper <- per_grouper %>%
select(
id, total, everything()
)
# Replace total column with more descriptive name: total_<ingredient>
names(per_grouper)[which(names(per_grouper) == "total")] <- paste0("total_", ingredient_want)
return(per_grouper)
}
# ------------------------------------------------------------------------------- #
ingredients_per_grouper <- get_ingredients_per_grouper(beer_spread_selected, grouper)
return(ingredients_per_grouper)
}
ingredient_want as first hops, then malt# Same for malt
ingredients_per_beer_malt <- pick_ingredient_get_beer(ingredient_want = "malt",
beer_necessities,
grouper = c("id"))
Called from: get_ingredients_per_grouper(beer_spread_selected, grouper)
debug at #137: per_grouper <- df_grouped %>% select(-c(abv, ibu, srm)) %>% summarise_if(is.numeric,
sum, na.rm = TRUE) %>% mutate(total = rowSums(.[(max_not_for_summing +
1):ncol(.)], na.rm = TRUE))
debug at #149: per_grouper <- per_grouper %>% select(id, total, everything())
debug at #155: names(per_grouper)[which(names(per_grouper) == "total")] <- paste0("total_",
ingredient_want)
debug at #157: return(per_grouper)
# Join those on our original dataframe by name
beer_ingredients_join_first_ingredient <- left_join(beer_necessities, ingredients_per_beer_hops,
by = "id")
beer_ingredients_join <- left_join(beer_ingredients_join_first_ingredient, ingredients_per_beer_malt,
by = "id")
# Take out some unnecessary columns
unnecessary_cols <- c("styleId", "abv_scaled", "ibu_scaled", "srm_scaled",
"hops_id", "malt_id", "glasswareId", "style.categoryId")
beer_ingredients_join <- beer_ingredients_join[, (! names(beer_ingredients_join) %in% unnecessary_cols)]
Now we’re left with something of a sparse matrix of all the ingredients compared to all the beers
kable(beer_ingredients_join[1:20, ])
| id | name | total_hops | total_malt | style | abv | ibu | srm | glass | hops_name | malt_name | style_collapsed | #06300 | Admiral | Aged / Debittered Hops (Lambic) | Ahtanum | Alchemy | Amarillo | Amarillo Gold | Apollo | Aquila | Aramis | Argentine Cascade | Athanum | Aurora | Australian Dr. Rudi | Azacca | Azzeca | Belma | Bobek | Bramling Cross | Bravo | Brewer's Gold | Brewer's Gold (American) | Calypso | Cascade | Celeia | Centennial | Challenger | Chinook | Citra | Cluster | Cobb | Columbus | Columbus (Tomahawk) | Comet | Crystal | CTZ | Delta | East Kent Golding | El Dorado | Ella | Enigma | Equinox | Eureka | Experimental 05256 | Experimental 06277 | Falconer's Flight | First Gold | French Strisserspalt | French Triskel | Fuggle (American) | Fuggle (English) | Fuggles | Galaxy | Galena | German Magnum | German Mandarina Bavaria | German Opal | German Perle | German Polaris | German Select | German Tradition | Glacier | Golding (American) | Green Bullet | Hallertau Hallertauer Mittelfrüher | Hallertau Hallertauer Tradition | Hallertau Northern Brewer | Hallertauer (American) | Hallertauer Herkules | Hallertauer Hersbrucker | Hallertauer Perle | Hallertauer Select | Helga | Hop Extract | Hops | Horizon | Huell Melon | Idaho 7 | Jarrylo | Kent Goldings | Kohatu | Lemon Drop | Liberty | Magnum | Marynka | Meridian | Millenium | Mosaic | Motueka | Mount Hood | Mt. Rainier | Nelson Sauvin | New Zealand Hallertauer | New Zealand Motueka | New Zealand Sauvin | Newport | Noble | Northdown | Northern Brewer (American) | Nugget | Orbit | Pacific Gem | Pacific Jade | Pacifica | Palisades | Perle (American) | Phoenix | Pilgrim | Premiant | Pride of Ringwood | Rakau | Revolution | Saaz (American) | Saaz (Czech) | Santiam | Saphir (German Organic) | Simcoe | Sladek (Saaz) | Sorachi Ace | Southern Cross | Sovereign | Spalt | Spalt Select | Spalt Spalter | Sterling | Sticklebract | Strisselspalt | Styrian Aurora | Styrian Bobeks | Styrian Goldings | Summit | Super Galena | Target | Tettnang Tettnanger | Tettnanger (American) | Tomahawk | Topaz | Tradition | Ultra | Vanguard | Vic Secret | Waimea | Wakatu | Warrior | Willamette | Yakima Willamette | Zeus | Zythos | Abbey Malt | Acidulated Malt | Amber Malt | Aromatic Malt | Asheburne Mild Malt | Bamberg Smoked Malt | Barley - Black | Barley - Flaked | Barley - Lightly Roasted | Barley - Malted | Barley - Raw | Barley - Roasted | Barley - Roasted/De-husked | Beechwood Smoked | Belgian Pale | Belgian Pilsner | Biscuit Malt | Black Malt | Black Malt - Debittered | Black Malt - Organic | Black Patent | Black Roast | Blackprinz Malt | Blue Agave Nectar | Blue Corn | Bonlander | Briess 2-row Chocolate Malt | Briess Blackprinz Malt | British Pale Malt | Brown Malt | Brown Sugar | Buckwheat - Roasted | C-15 | Canada 2-Row Silo | Cane Sugar | Cara Malt | CaraAmber | CaraAroma | CaraBrown | Carafa I | Carafa II | Carafa III | Carafa Special | CaraFoam | CaraHell | Caramel/Crystal Malt | Caramel/Crystal Malt - Dark | Caramel/Crystal Malt - Extra Dark | Caramel/Crystal Malt - Heritage | Caramel/Crystal Malt - Light | Caramel/Crystal Malt - Medium | Caramel/Crystal Malt - Organic | Caramel/Crystal Malt 10L | Caramel/Crystal Malt 120L | Caramel/Crystal Malt 150L | Caramel/Crystal Malt 15L | Caramel/Crystal Malt 20L | Caramel/Crystal Malt 300L | Caramel/Crystal Malt 30L | Caramel/Crystal Malt 40L | Caramel/Crystal Malt 45L | Caramel/Crystal Malt 50L | Caramel/Crystal Malt 55L | Caramel/Crystal Malt 60L | Caramel/Crystal Malt 70L | Caramel/Crystal Malt 75L | Caramel/Crystal Malt 80L | Caramel/Crystal Malt 85L | Caramel/Crystal Malt 8L | Caramel/Crystal Malt 90L | CaraMunich | CaraMunich 120L | CaraMunich 20L | CaraMunich 40L | CaraMunich 60L | CaraMunich I | CaraMunich II | CaraMunich III | CaraPils/Dextrin Malt | CaraRed | CaraRye | CaraStan | CaraVienne Malt | CaraWheat | Carolina Rye Malt | Cereal | Cherry Smoked | Cherrywood Smoke Malt | Chit Malt | Chocolate Malt | Chocolate Rye Malt | Chocolate Wheat Malt | Coffee Malt | Corn | Corn - Field | Corn - Flaked | Corn Grits | Crisp 120 | Crisp 77 | Crystal 77 | Dark Chocolate | Dememera Sugar | Dextrin Malt | Dextrose Syrup | Extra Special Malt | Fawcett Crystal Rye | Fawcett Rye | German Cologne | Gladfield Pale | Glen Eagle Maris Otter | Golden Promise | Harrington 2-Row Base Malt | High Fructose Corn Syrup | Honey | Honey Malt | Hugh Baird Pale Ale Malt | Kiln Amber | Lactose | Lager Malt | Malt Extract | Malted Rye | Malto Franco-Belge Pils Malt | Maple Syrup | Maris Otter | Melanoidin Malt | Metcalfe | Midnight Wheat | Mild Malt | Millet | Munich Malt | Munich Malt - Dark | Munich Malt - Light | Munich Malt - Organic | Munich Malt - Smoked | Munich Malt - Type I | Munich Malt - Type II | Munich Malt 10L | Munich Malt 20L | Munich Malt 40L | Munich Wheat | Oats - Flaked | Oats - Golden Naked | Oats - Malted | Oats - Rolled | Oats - Steel Cut (Pinhead Oats) | Oats - Toasted | Pale Chocolate Malt | Pale Malt | Pale Malt - Halcyon | Pale Malt - Optic | Pale Malt - Organic | Pale Wheat | Palev | Pearl Malt | Peated Malt - Smoked | Piloncillo | Pilsner Malt | Pilsner Malt - Organic | Rahr 2-Row Malt | Rahr Special Pale | Rauchmalz | Rice | Rice - Flaked | Rice - Hulls | Rice - Red | Rice - White | Roast Malt | Rye - Flaked | Rye Malt | Samuel Adams two-row pale malt blend | Six-Row Pale Malt | Smoked Malt | Special B Malt | Special Roast | Special W Malt | Spelt Malt | Sugar (Albion) | Toasted Malt | Torrefied Wheat | Two-Row Barley Malt | Two-Row Pale Malt | Two-Row Pale Malt - Organic | Two-Row Pale Malt - Toasted | Two-Row Pilsner Malt | Two-Row Pilsner Malt - Belgian | Two-Row Pilsner Malt - Germany | Victory Malt | Vienna Malt | Weyermann Rye | Wheat - Flaked | Wheat - Raw | Wheat - Red | Wheat - Toasted | Wheat - Torrified | Wheat Malt | Wheat Malt - Dark | Wheat Malt - German | Wheat Malt - Light | Wheat Malt - Organic | Wheat Malt - Red | Wheat Malt - Smoked | Wheat Malt - White | White Wheat | Wyermann Vienna |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cBLTUw | "18" Imperial IPA 2 | 0 | 0 | American-Style Imperial Stout | 11.10 | NA | 33 | Pint | NA | NA | Stout | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Now that the munging is done, onto the main question: do natural clusters in beer align with style boundaries?
We K-means cluster beers based on certain numeric predictor variables.
Prep
library(NbClust)
cluster_it <- function(df, preds, to_scale, resp, n_centers) {
df_for_clustering <- df %>%
select_(.dots = c(response_vars, cluster_on)) %>%
na.omit() %>%
filter(
abv < 20 & abv > 3
) %>%
filter(
ibu < 200
)
df_all_preds <- df_for_clustering %>%
select_(.dots = preds)
df_preds_scale <- df_all_preds %>%
select_(.dots = to_scale) %>%
rename(
abv_scaled = abv,
ibu_scaled = ibu,
srm_scaled = srm
) %>%
scale() %>%
as_tibble()
df_preds <- bind_cols(df_preds_scale, df_all_preds[, (!names(df_all_preds) %in% to_scale)])
df_outcome <- df_for_clustering %>%
select_(.dots = resp) %>%
na.omit()
set.seed(9)
clustered_df_out <- kmeans(x = df_preds, centers = n_centers, trace = FALSE)
clustered_df <- as_tibble(data.frame(
cluster_assignment = factor(clustered_df_out$cluster),
df_outcome, df_preds,
df_for_clustering %>% select(abv, ibu, srm)))
return(clustered_df)
}
Cluster
First we’ll run the fuction with 10 centers, and cluster on the predictors ABV, IBU, SRM, total_hops, and total_malt.
cluster_on <- c("abv", "ibu", "srm", "total_hops", "total_malt")
to_scale <- c("abv", "ibu", "srm", "total_hops", "total_malt")
response_vars <- c("name", "style", "style_collapsed")
clustered_beer <- cluster_it(df = beer_totals,
preds = cluster_on,
to_scale = to_scale,
resp = response_vars,
n_centers = 10)
Head of the resulting clustered data. Cluster assignment column on the far left.
kable(clustered_beer[1:20, ])
| cluster_assignment | name | style | style_collapsed | abv_scaled | ibu_scaled | srm_scaled | total_hops | total_malt | abv | ibu | srm |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 10 | "Admiral" Stache | Baltic-Style Porter | Porter | 0.2700989 | -0.7075654 | 2.1858706 | 0.4674779 | 1.1440890 | 7.0 | 23.0 | 37 |
| 10 | "Ah Me Joy" Porter | Robust Porter | Porter | -0.6074754 | 0.3844558 | 2.4677869 | -0.1933839 | -0.2023226 | 5.4 | 51.0 | 40 |
| 6 | "Bison Eye Rye" Pale Ale | 2 of 4 Part Pale Ale Series | American-Style Pale Ale | Pale Ale | -0.3880818 | 0.3844558 | -0.5393202 | -0.1933839 | -0.2023226 | 5.8 | 51.0 | 8 |
| 6 | "Dust Up" Cloudy Pale Ale | 1 of 4 Part Pale Ale Series | American-Style Pale Ale | Pale Ale | -0.6074754 | 0.5014580 | -0.2574039 | -0.1933839 | -0.2023226 | 5.4 | 54.0 | 11 |
| 3 | "God Country" Kolsch | German-Style Kölsch / Köln-Style Kölsch | Kölsch | -0.4977786 | -0.5047614 | -0.8212365 | -0.1933839 | -0.2023226 | 5.6 | 28.2 | 5 |
| 3 | "Jemez Field Notes" Golden Lager | Golden or Blonde Ale | Blonde | -0.8817174 | -0.8245676 | -0.8212365 | -0.1933839 | -0.2023226 | 4.9 | 20.0 | 5 |
| 3 | #10 Hefewiezen | South German-Style Hefeweizen / Hefeweissbier | Wheat | -0.7720206 | -1.1755744 | -0.9152086 | -0.1933839 | -0.2023226 | 5.1 | 11.0 | 4 |
| 3 | #9 | American-Style Pale Ale | Pale Ale | -0.7720206 | -0.8245676 | -0.4453481 | 0.4674779 | 0.4708832 | 5.1 | 20.0 | 9 |
| 3 | #KoLSCH | German-Style Kölsch / Köln-Style Kölsch | Kölsch | -0.9365658 | -0.5515624 | -1.0091807 | -0.1933839 | -0.2023226 | 4.8 | 27.0 | 3 |
| 3 | 'Inappropriate' Cream Ale | American-Style Cream Ale or Lager | Lager | -0.6623238 | -0.9025691 | -0.8212365 | -0.1933839 | -0.2023226 | 5.3 | 18.0 | 5 |
| 8 | 'tis the Saison | French & Belgian-Style Saison | Saison | 0.2700989 | -0.4345601 | -0.6332923 | -0.1933839 | -0.2023226 | 7.0 | 30.0 | 7 |
| 3 | (306) URBAN WHEAT BEER | Belgian-Style White (or Wit) / Belgian-Style Wheat | Wheat | -0.8268690 | -0.8245676 | -0.4453481 | -0.1933839 | -0.2023226 | 5.0 | 20.0 | 9 |
| 4 | (512) Bruin (A.K.A. Brown Bear) | American-Style Brown Ale | Brown | 0.5991893 | -0.4345601 | 0.6823171 | 0.1370470 | 1.1440890 | 7.6 | 30.0 | 21 |
| 8 | (512) FOUR | Strong Ale | Strong Ale | 0.5443409 | -0.2395563 | -0.5393202 | 0.7979088 | 1.1440890 | 7.5 | 35.0 | 8 |
| 7 | (512) IPA | American-Style India Pale Ale | India Pale Ale | 0.2700989 | 0.9304663 | -0.5393202 | 0.7979088 | 0.8074861 | 7.0 | 65.0 | 8 |
| 8 | (512) ONE | Belgian-Style Pale Strong Ale | Strong Ale | 0.8185829 | -0.7465661 | -0.5393202 | -0.1933839 | 0.4708832 | 8.0 | 22.0 | 8 |
| 6 | (512) Pale | American-Style Pale Ale | Pale Ale | -0.2783850 | -0.4345601 | -0.6332923 | 0.7979088 | 0.8074861 | 6.0 | 30.0 | 7 |
| 10 | (512) SIX | Belgian-Style Dubbel | Dubbel | 0.5443409 | -0.6295639 | 1.3401218 | 0.4674779 | 0.8074861 | 7.5 | 25.0 | 28 |
| 8 | (512) THREE | Belgian-Style Tripel | Tripel | 1.6413088 | -0.7465661 | -0.3513760 | 0.1370470 | 0.8074861 | 9.5 | 22.0 | 10 |
| 9 | (512) THREE (Cabernet Barrel Aged) | Belgian-Style Tripel | Tripel | 1.6413088 | -0.7465661 | 2.4677869 | -0.1933839 | -0.2023226 | 9.5 | 22.0 | 40 |
# How many rows do we have?
nrow(clustered_beer)
[1] 3918
Join the clustered beer on beer_ingredients_join
beer_ingredients_join_clustered <- left_join(beer_ingredients_join, clustered_beer,
by = "name")
A table of cluster counts broken down by style
cluster_table_counts <- table(style = clustered_beer$style_collapsed, cluster = clustered_beer$cluster_assignment)
kable(cluster_table_counts)
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|---|---|---|---|
| Barley Wine | 0 | 28 | 0 | 0 | 14 | 0 | 2 | 7 | 11 | 0 |
| Barrel-Aged | 0 | 3 | 2 | 4 | 6 | 3 | 1 | 11 | 15 | 3 |
| Bitter | 0 | 0 | 17 | 20 | 0 | 38 | 2 | 1 | 1 | 1 |
| Black | 0 | 0 | 0 | 1 | 18 | 0 | 7 | 0 | 0 | 17 |
| Blonde | 0 | 0 | 118 | 2 | 0 | 13 | 1 | 24 | 1 | 1 |
| Brown | 0 | 1 | 8 | 95 | 3 | 2 | 6 | 0 | 6 | 27 |
| Double India Pale Ale | 0 | 171 | 0 | 0 | 11 | 0 | 45 | 4 | 1 | 0 |
| Dubbel | 0 | 0 | 0 | 16 | 0 | 0 | 1 | 7 | 6 | 11 |
| Fruit Beer | 0 | 0 | 36 | 7 | 0 | 2 | 4 | 4 | 2 | 1 |
| Fruit Cider | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| German-Style Doppelbock | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 5 | 12 | 6 |
| German-Style Märzen | 11 | 0 | 8 | 10 | 0 | 1 | 0 | 0 | 0 | 0 |
| Herb and Spice Beer | 0 | 0 | 13 | 13 | 0 | 4 | 6 | 3 | 4 | 12 |
| India Pale Ale | 15 | 18 | 6 | 7 | 10 | 100 | 413 | 3 | 0 | 5 |
| Kölsch | 0 | 0 | 67 | 1 | 0 | 3 | 1 | 0 | 0 | 0 |
| Lager | 0 | 3 | 135 | 50 | 4 | 28 | 27 | 10 | 3 | 7 |
| Other Belgian-Style Ales | 0 | 0 | 4 | 7 | 1 | 4 | 9 | 4 | 5 | 5 |
| Pale Ale | 19 | 2 | 57 | 25 | 3 | 229 | 49 | 11 | 1 | 2 |
| Pilsener | 0 | 1 | 74 | 0 | 1 | 54 | 3 | 3 | 0 | 0 |
| Porter | 0 | 0 | 0 | 36 | 9 | 1 | 0 | 1 | 10 | 127 |
| Pumpkin Beer | 0 | 0 | 7 | 18 | 0 | 2 | 0 | 9 | 5 | 5 |
| Red | 0 | 8 | 33 | 125 | 13 | 46 | 21 | 7 | 4 | 16 |
| Saison | 0 | 0 | 52 | 6 | 1 | 34 | 2 | 41 | 0 | 3 |
| Scotch Ale | 0 | 0 | 0 | 10 | 1 | 0 | 0 | 5 | 7 | 10 |
| Sour | 0 | 0 | 18 | 4 | 0 | 3 | 1 | 4 | 5 | 2 |
| Specialty Beer | 0 | 1 | 15 | 13 | 0 | 5 | 5 | 11 | 5 | 10 |
| Stout | 0 | 0 | 2 | 6 | 49 | 2 | 1 | 3 | 14 | 126 |
| Strong Ale | 0 | 4 | 0 | 5 | 1 | 2 | 5 | 29 | 33 | 3 |
| Tripel | 0 | 2 | 0 | 0 | 1 | 1 | 0 | 57 | 4 | 0 |
| Wheat | 0 | 0 | 268 | 12 | 0 | 17 | 4 | 11 | 2 | 3 |
Plot the clusters. There are 3 axes: ABV, IBU, and SRM, so we choose two at a time.
clustered_beer_plot_abv_ibu <- ggplot(data = clustered_beer, aes(x = abv, y = ibu, colour = cluster_assignment)) +
geom_jitter() + theme_minimal() +
ggtitle("k-Means Clustering of Beer by ABV, IBU, SRM") +
labs(x = "ABV", y = "IBU") +
labs(colour = "Cluster Assignment")
clustered_beer_plot_abv_ibu
clustered_beer_plot_abv_srm <- ggplot(data = clustered_beer, aes(x = abv, y = srm, colour = cluster_assignment)) +
geom_jitter() + theme_minimal() +
ggtitle("k-Means Clustering of Beer by ABV, IBU, SRM") +
labs(x = "ABV", y = "SRM") +
labs(colour = "Cluster Assignment")
clustered_beer_plot_abv_srm
Now we can add in the style centers (means) for each style_collapsed and label it.
library(ggrepel)
abv_ibu_clusters_vs_style_centers <- ggplot() +
geom_point(data = clustered_beer,
aes(x = abv, y = ibu, colour = cluster_assignment), alpha = 0.5) +
geom_point(data = style_centers,
aes(mean_abv, mean_ibu), colour = "black") +
geom_text_repel(data = style_centers, aes(mean_abv, mean_ibu, label = style_collapsed),
box.padding = unit(0.45, "lines"),
family = "Calibri",
label.size = 0.3) +
ggtitle("Popular Styles vs. k-Means Clustering of Beer by ABV, IBU, SRM") +
labs(x = "ABV", y = "IBU") +
labs(colour = "Cluster Assignment") +
theme_bw()
abv_ibu_clusters_vs_style_centers
The clustering above used a smaller number of clusters (10) than there are styles_collapsed. That makes it difficult to determine whether a given style fits snugly into a cluster or not.
Cluster on just certain selected styles
We’ll take five very distinct collapsed styles and re-run the clustering on beers that fall into these categories. These styles were intentionally chosen because they are quite distinct: Blonde, IPA, Stout, Tripel, Wheat. Arguably, of these five styles Blondes and Wheats are the closest
styles_to_keep <- c("Blonde", "India Pale Ale", "Stout", "Tripel", "Wheat")
bt_certain_styles <- beer_totals %>%
filter(
style_collapsed %in% styles_to_keep
) %>%
droplevels()
cluster_on <- c("abv", "ibu", "srm", "total_hops", "total_malt")
to_scale <- c("abv", "ibu", "srm", "total_hops", "total_malt")
response_vars <- c("name", "style", "style_collapsed")
certain_styles_clustered <- cluster_it(df = bt_certain_styles,
preds = cluster_on,
to_scale = to_scale,
resp = response_vars,
n_centers = 5)
style_centers_certain_styles <- style_centers %>%
filter(style_collapsed %in% styles_to_keep)
Table of style vs. cluster.
kable(table(style = certain_styles_clustered$style_collapsed, cluster = certain_styles_clustered$cluster_assignment))
Now that we have a manageable number of styles, we can see how well fit each cluster is to each style. If the features we clustered on perfectly predicted style, there would each color (cluster) would be unique to each facet of the plot. (E.g., left entirely blue, second from left entirely green, etc.)
by_style_plot <- ggplot() +
geom_point(data = certain_styles_clustered,
aes(x = abv, y = ibu,
colour = cluster_assignment), alpha = 0.5) +
facet_grid(. ~ style_collapsed) +
geom_point(data = style_centers_certain_styles,
aes(mean_abv, mean_ibu), colour = "black", shape = 5) +
ggtitle("Selected Styles Cluster Assignment") +
labs(x = "ABV", y = "IBU") +
labs(colour = "Cluster") +
theme_bw()
by_style_plot
–>
Do more hops always mean more bitterness?
ggplot(data = beer_ingredients_join, aes(total_hops, ibu)) +
geom_point(aes(total_hops, ibu, colour = style_collapsed)) +
geom_smooth(method = lm, se = FALSE, colour = "black") +
ggtitle("Hops Per Beer vs. Bitterness") +
labs(x = "Number of Hops", y = "IBU", colour = "Style Collapsed") +
theme_minimal()
Regressing total number of hops on bitterness (IBU):
hops_ibu_lm <- lm(ibu ~ total_hops, data = beer_ingredients_join)
summary(hops_ibu_lm)
ggplot(data = beer_ingredients_join[which(beer_ingredients_join$total_hops > 2
& beer_ingredients_join$total_hops < 8), ], aes(total_hops, ibu)) +
geom_point(aes(total_hops, ibu, colour = style_collapsed)) +
geom_smooth(method = lm, se = FALSE, colour = "black") +
ggtitle("3+ Hops Per Beer vs. Bitterness") +
labs(x = "Number of Hops", y = "IBU", colour = "Style Collapsed") +
theme_minimal()
Most popular hops
# Gather up all the hops columns into one called `hop_name`
beer_necessities_hops_gathered <- beer_necessities %>%
gather(
hop_key, hop_name, hops_name_1:hops_name_13
) %>% as_tibble()
# Filter to just those beers that have at least one hop
beer_necessities_w_hops <- beer_necessities_hops_gathered %>%
filter(!is.na(hop_name)) %>%
filter(!hop_name == "")
beer_necessities_w_hops$hop_name <- factor(beer_necessities_w_hops$hop_name)
# For all hops, find the number of beers they're in as well as those beers' mean IBU and ABV
hops_beer_stats <- beer_necessities_w_hops %>%
ungroup() %>%
group_by(hop_name) %>%
summarise(
mean_ibu = mean(ibu, na.rm = TRUE),
mean_abv = mean(abv, na.rm = TRUE),
n = n()
)
# Pare to hops that are used in at least 50 beers
pop_hops_beer_stats <- hops_beer_stats[hops_beer_stats$n > 50, ]
kable(pop_hops_beer_stats)
# Keep just beers that contain these most popular hops
beer_necessities_w_popular_hops <- beer_necessities_w_hops %>%
filter(hop_name %in% pop_hops_beer_stats$hop_name) %>%
droplevels()
Are there certian hops that are used more often in very high IBU or ABV beers? Hard to detect a pattern
ggplot(data = beer_necessities_w_popular_hops) +
geom_point(aes(abv, ibu, colour = hop_name)) +
ggtitle("Beers Containing most Popular Hops") +
labs(x = "ABV", y = "IBU", colour = "Hop Name") +
theme_minimal()
ggplot(data = pop_hops_beer_stats) +
geom_point(aes(mean_abv, mean_ibu, colour = hop_name, size = n)) +
ggtitle("Most Popular Hops' Effect on Alcohol and Bitterness") +
labs(x = "Mean ABV per Hop Type", y = "Mean IBU per Hop Type", colour = "Hop Name",
size = "Number of Beers") +
theme_minimal()
style or style_collapsed?style or style_collapsed; the one not specified as outcome will be droppedpredictor_vars
library(nnet)
library(caret)
run_neural_net <- function(df, outcome, predictor_vars) {
out <- list(outcome = outcome)
# Create a new column outcome; it's style_collapsed if you set outcome to style_collapsed, and style otherwise
if (outcome == "style_collapsed") {
df[["outcome"]] <- df[["style_collapsed"]]
} else {
df[["outcome"]] <- df[["style"]]
}
df$outcome <- factor(df$outcome)
cols_to_keep <- c("outcome", predictor_vars)
df <- df %>%
select_(.dots = cols_to_keep) %>%
mutate(row = 1:nrow(df)) %>%
droplevels()
# Select 80% of the data for training
df_train <- sample_n(df, nrow(df)*(0.8))
# The rest is for testing
df_test <- df %>%
filter(! (row %in% df_train$row)) %>%
select(-row)
df_train <- df_train %>%
select(-row)
# Build multinomail neural net
nn <- multinom(outcome ~ .,
data = df_train, maxit=500, trace=FALSE)
# Which variables are the most important in the neural net?
most_important_vars <- varImp(nn)
# How accurate is the model? Compare predictions to outcomes from test data
nn_preds <- predict(nn, type="class", newdata = df_test)
nn_accuracy <- postResample(df_test$outcome, nn_preds)
out <- list(out, nn = nn, most_important_vars = most_important_vars,
df_test = df_test,
nn_preds = nn_preds,
nn_accuracy = nn_accuracy)
return(out)
}
beer_totals, the predictor variables to be the vector contained in p_vars, the outcome to be style_collapsedTake out NAs
bt_omit <- beer_totals %>% na.omit()
p_vars <- c("total_hops", "total_malt", "abv", "ibu", "srm")
nn_collapsed_out <- run_neural_net(df = bt_omit, outcome = "style_collapsed",
predictor_vars = p_vars)
# How accurate was it?
nn_collapsed_out$nn_accuracy
# What were the most important variables?
nn_collapsed_out$most_important_vars
style instead of style_collapsed?
nn_notcollapsed_out <- run_neural_net(df = bt_omit, outcome = "style",
predictor_vars = p_vars)
nn_notcollapsed_out$nn_accuracy
nn_notcollapsed_out$most_important_vars
And now if we add glass as a predictor?
p_vars_add_glass <- c("total_hops", "total_malt", "abv", "ibu", "srm", "glass")
nn_collapsed_out_add_glass <- run_neural_net(df = beer_ingredients_join, outcome = "style_collapsed",
predictor_vars = p_vars_add_glass)
nn_collapsed_out_add_glass$nn_accuracy
nn_collapsed_out_add_glass$most_important_vars
ranger can handle sparse data like thisglass as a predictor
library(ranger)
library(stringr)
bi <- beer_ingredients_join %>%
select(-c(id, name, style, hops_name, malt_name,
# description,
glass)) %>%
mutate(row = 1:nrow(.)) %>%
na.omit()
bi$style_collapsed <- factor(bi$style_collapsed)
# ranger complains about special characters and spaces in ingredient column names. Take them out and replace with empty string.
names(bi) <- tolower(names(bi))
names(bi) <- str_replace_all(names(bi), " ", "")
names(bi) <- str_replace_all(names(bi), "([\\(\\)-\\/')]+)", "")
# Keep 80% for training
bi_train <- sample_n(bi, nrow(bi)*(0.8))
# The rest is for testing
bi_test <- bi %>%
filter(! (row %in% bi_train$row)) %>%
dplyr::select(-row)
bi_train <- bi_train %>%
dplyr::select(-row) %>%
select(-`#06300`)
bi_rf <- ranger(style_collapsed ~ ., data = bi_train, importance = "impurity", seed = 11)
OOB (out of bag) prediction error is around 58% * This calculated from tree samples constructed but not used in training set; these trees become effectively part of test set
bi_rf
We can compare predicted classification on the test set to their actual style classification.
pred_bi_rf <- predict(bi_rf, dat = bi_test)
# kable(table(bi_test$style_collapsed, pred_bi_rf$predictions))
Variable importance
total_hops and total_malt
importance(bi_rf)[1:10]
How does a CSRF (case-specific random forest) fare?
bi_csrf <- csrf(style_collapsed ~ ., training_data = bi_train, test_data = bi_test,
params1 = list(num.trees = 5, mtry = 4),
params2 = list(num.trees = 2))
csrf_acc <- postResample(bi_csrf, bi_test$style_collapsed)
csrf_acc
Style first, forgiveness later?
Future Directions
sessionInfo()